var ot = Object.defineProperty; var it = (e, t, n) => t in e ? ot(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var W = (e, t, n) => (it(e, typeof t != "symbol" ? t + "" : t, n), n), z = (e, t, n) => { if (!t.has(e)) throw TypeError("Cannot " + n); }; var u = (e, t, n) => (z(e, t, "read from private field"), n ? n.call(e) : t.get(e)), F = (e, t, n) => { if (t.has(e)) throw TypeError("Cannot add the same private member more than once"); t instanceof WeakSet ? t.add(e) : t.set(e, n); }, k = (e, t, n, o) => (z(e, t, "write to private field"), o ? o.call(e, n) : t.set(e, n), n); const at = (e, t, n, o, i) => { const d = n.length; let r = t.length, a = d, s = 0, f = 0, l = null; for (; s < r || f < a; ) if (r === s) { const c = a < d ? f ? o(n[f - 1], -0).nextSibling : o(n[a], 0) : i; for (; f < a; ) e.insertBefore(o(n[f++], 1), c); } else if (a === f) for (; s < r; ) (!l || !l.has(t[s])) && e.removeChild(o(t[s], -1)), s++; else if (t[s] === n[f]) s++, f++; else if (t[r - 1] === n[a - 1]) r--, a--; else if (t[s] === n[a - 1] && n[f] === t[r - 1]) { const c = o(t[--r], -0).nextSibling; e.insertBefore( o(n[f++], 1), o(t[s++], -0).nextSibling ), e.insertBefore(o(n[--a], 1), c), t[r] = n[a]; } else { if (!l) { l = /* @__PURE__ */ new Map(); let c = f; for (; c < a; ) l.set(n[c], c++); } if (l.has(t[s])) { const c = l.get(t[s]); if (f < c && c < a) { let p = s, g = 1; for (; ++p < r && p < a && l.get(t[p]) === c + g; ) g++; if (g > c - f) { const b = o(t[s], 0); for (; f < c; ) e.insertBefore(o(n[f++], 1), b); } else e.replaceChild( o(n[f++], 1), o(t[s++], -1) ); } else s++; } else e.removeChild(o(t[s++], -1)); } return n; }, { isArray: R } = Array, { getPrototypeOf: st, getOwnPropertyDescriptor: rt } = Object, ct = "http://www.w3.org/2000/svg", m = [], G = () => document.createRange(), I = (e, t, n) => (e.set(t, n), n), lt = (e, t) => { let n; do n = rt(e, t); while (!n && (e = st(e))); return n; }, dt = (e, t) => t.reduceRight(ft, e), ft = (e, t) => e.childNodes[t], pt = 1, gt = 8, ut = 11, { setPrototypeOf: ht } = Object, mt = (e) => { function t(n) { return ht(n, new.target.prototype); } return t.prototype = e.prototype, t; }; let w; const X = (e, t, n) => (w || (w = G()), n ? w.setStartAfter(e) : w.setStartBefore(e), w.setEndAfter(t), w.deleteContents(), e), D = ({ firstChild: e, lastChild: t }, n) => X(e, t, n); let q = !1; const N = (e, t) => q && e.nodeType === ut ? 1 / t < 0 ? t ? D(e, !0) : e.lastChild : t ? e.valueOf() : e.firstChild : e, H = (e) => document.createComment(e); var y, C, h; class bt extends mt(DocumentFragment) { constructor(n) { super(n); F(this, y, H("<>")); F(this, C, H("")); F(this, h, m); this.replaceChildren(u(this, y), ...n.childNodes, u(this, C)), q = !0; } get firstChild() { return u(this, y); } get lastChild() { return u(this, C); } get parentNode() { return u(this, y).parentNode; } remove() { D(this, !1); } replaceWith(n) { D(this, !0).replaceWith(n); } valueOf() { const { parentNode: n } = this; if (n === this) u(this, h) === m && k(this, h, [...this.childNodes]); else { if (n) { let { firstChild: o, lastChild: i } = this; for (k(this, h, [o]); o !== i; ) u(this, h).push(o = o.nextSibling); } this.replaceChildren(...u(this, h)); } return this; } } y = new WeakMap(), C = new WeakMap(), h = new WeakMap(); const Y = (e, t, n) => e.setAttribute(t, n), _ = (e, t) => e.removeAttribute(t), wt = (e, t) => { for (const n in t) { const o = t[n], i = n === "role" ? n : `aria-${n}`; o == null ? _(e, i) : Y(e, i, o); } return t; }; let M; const yt = (e, t, n) => { n = n.slice(1), M || (M = /* @__PURE__ */ new WeakMap()); const o = M.get(e) || I(M, e, {}); let i = o[n]; return i && i[0] && e.removeEventListener(n, ...i), i = R(t) ? t : [t, !1], o[n] = i, i[0] && e.addEventListener(n, ...i), t; }, E = (e, t) => { const { t: n, n: o } = e; let i = !1; switch (typeof t) { case "object": if (t !== null) { (o || n).replaceWith(e.n = t.valueOf()); break; } case "undefined": i = !0; default: n.data = i ? "" : t, o && (e.n = null, o.replaceWith(n)); break; } return t; }, xt = (e, t) => K( e, t, t == null ? "class" : "className" ), Ut = (e, t) => { const { dataset: n } = e; for (const o in t) t[o] == null ? delete n[o] : n[o] = t[o]; return t; }, B = (e, t, n) => e[n] = t, Et = (e, t, n) => B(e, t, n.slice(1)), K = (e, t, n) => t == null ? (_(e, n), t) : B(e, t, n), Q = (e, t) => (typeof t == "function" ? t(e) : t.current = e, t), $ = (e, t, n) => (t == null ? _(e, n) : Y(e, n, t), t), Ct = (e, t) => t == null ? K(e, t, "style") : B(e.style, t, "cssText"), At = (e, t, n) => (e.toggleAttribute(n.slice(1), t), t), v = (e, t, n) => { const { length: o } = t; if (e.data = `[${o}]`, o) return at(e.parentNode, n, t, N, e); switch (n.length) { case 1: n[0].remove(); case 0: break; default: X( N(n[0], 0), N(n.at(-1), -0), !1 ); break; } return m; }, Ft = /* @__PURE__ */ new Map([ ["aria", wt], ["class", xt], ["data", Ut], ["ref", Q], ["style", Ct] ]), Mt = (e, t, n) => { switch (t[0]) { case ".": return Et; case "?": return At; case "@": return yt; default: return n || "ownerSVGElement" in e ? t === "ref" ? Q : $ : Ft.get(t) || (t in e ? t.startsWith("on") ? B : lt(e, t)?.set ? K : $ : $); } }, St = (e, t) => (e.textContent = t ?? "", t), U = (e, t, n) => ({ a: e, b: t, c: n }), vt = (e, t) => ({ b: e, c: t }), _t = (e, t, n, o) => ({ v: m, u: e, t, n, c: o }), A = () => U(null, null, m), tt = (e) => (t, n) => { const { a: o, b: i, c: d } = e(t, n), r = document.importNode(o, !0); let a = m; if (i !== m) { a = []; for (let s, f, l = 0; l < i.length; l++) { const { a: c, b: p, c: g } = i[l], b = c === f ? s : s = dt(r, f = c); a[l] = _t( p, b, g, p === v ? [] : p === E ? A() : null ); } } return vt( d ? r.firstChild : new bt(r), a ); }, Bt = /^(?:plaintext|script|style|textarea|title|xmp)$/i, kt = /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i, Nt = /<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g, $t = /([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g, Lt = /[\x01\x02]/g, Ot = (e, t, n) => { let o = 0; return e.join("").trim().replace( Nt, (i, d, r, a) => `<${d}${r.replace($t, "=$2$1").trimEnd()}${a ? n || kt.test(d) ? " /" : `>` ).replace( Lt, (i) => i === "" ? `` : t + o++ ); }; let S = document.createElement("template"), L, O; const Tt = (e, t) => { if (t) return L || (L = document.createElementNS(ct, "svg"), O = G(), O.selectNodeContents(L)), O.createContextualFragment(e); S.innerHTML = e; const { content: n } = S; return S = S.cloneNode(!1), n; }, T = (e) => { const t = []; let n; for (; n = e.parentNode; ) t.push(t.indexOf.call(n.childNodes, e)), e = n; return t; }, P = () => document.createTextNode(""), Dt = (e, t, n) => { const o = Tt(Ot(e, x, n), n), { length: i } = e; let d = m; if (i > 1) { const s = [], f = document.createTreeWalker(o, 129); let l = 0, c = `${x}${l++}`; for (d = []; l < i; ) { const p = f.nextNode(); if (p.nodeType === gt) { if (p.data === c) { const g = R(t[l - 1]) ? v : E; g === E && s.push(p), d.push(U(T(p), g, null)), c = `${x}${l++}`; } } else { let g; for (; p.hasAttribute(c); ) { g || (g = T(p)); const b = p.getAttribute(c); d.push(U(g, Mt(p, b, n), b)), _(p, c), c = `${x}${l++}`; } !n && Bt.test(p.localName) && p.textContent.trim() === `` && (d.push(U(g || T(p), St, null)), c = `${x}${l++}`); } } for (l = 0; l < s.length; l++) s[l].replaceWith(P()); } const { childNodes: r } = o; let { length: a } = r; return a < 1 ? (a = 1, o.appendChild(P())) : a === 1 && i !== 1 && r[0].nodeType !== pt && (a = 0), I(et, e, U(o, d, a === 1)); }, et = /* @__PURE__ */ new WeakMap(), x = "is\xB5", nt = (e) => (t, n) => et.get(t) || Dt(t, n, e), It = tt(nt(!1)), Kt = tt(nt(!0)), V = (e, { s: t, t: n, v: o }) => { if (e.a !== n) { const { b: i, c: d } = (t ? Kt : It)(n, o); e.a = n, e.b = i, e.c = d; } for (let { c: i } = e, d = 0; d < i.length; d++) { const r = o[d], a = i[d]; switch (a.u) { case v: a.v = v( a.t, Vt(a.c, r), a.v ); break; case E: const s = r instanceof j ? V(a.c || (a.c = A()), r) : (a.c = null, r); s !== a.v && (a.v = E(a, s)); break; default: r !== a.v && (a.v = a.u(a.t, r, a.n, a.v)); break; } } return e.b; }, Vt = (e, t) => { let n = 0, { length: o } = t; for (o < e.length && e.splice(o); n < o; n++) { const i = t[n]; i instanceof j ? t[n] = V(e[n] || (e[n] = A()), i) : e[n] = null; } return t; }; class j { constructor(t, n, o) { this.s = t, this.t = n, this.v = o; } toDOM(t = A()) { return V(t, this); } } const J = /* @__PURE__ */ new WeakMap(), jt = (e, t) => { const n = J.get(e) || I(J, e, A()), { b: o } = n; return o !== (typeof t == "function" ? t() : t).toDOM(n) && e.replaceChildren(n.b.valueOf()), e; }; /*! (c) Andrea Giammarchi - MIT */ const Wt = (e) => (t, ...n) => new j(e, t, n), zt = Wt(!1), Ht = ` /* Font definitions */ /* cyrillic-ext */ @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZJhiJ-Ek-_EeAmM.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } /* cyrillic */ @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZthiJ-Ek-_EeAmM.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZNhiJ-Ek-_EeAmM.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZxhiJ-Ek-_EeAmM.woff2) format('woff2'); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; } /* vietnamese */ @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZBhiJ-Ek-_EeAmM.woff2) format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZFhiJ-Ek-_EeAmM.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiJ-Ek-_EeA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } /* Global styles scoped to the badge */ .anima-badge * { -webkit-font-smoothing: antialiased; box-sizing: border-box; } .anima-badge button:focus-visible { outline: 2px solid #4a90e2 !important; outline: -webkit-focus-ring-color auto 5px !important; } /* CSS Variables */ .anima-badge { --badge-bg-color: #1a1d2e; --badge-border-color: #6c53ce; --badge-text-color: #f2f5f9; --body-regular-md-font-family: "Inter", Helvetica; --body-regular-md-font-weight: 400; --body-regular-md-font-size: 14px; --body-regular-md-letter-spacing: 0px; --body-regular-md-line-height: 1.5; --body-regular-md-font-style: normal; } /* Badge Container */ .anima-badge { position: fixed; bottom: 20px; right: 20px; z-index: 9999; } /* Badge Button */ .anima-badge .badge-button { all: unset; box-sizing: border-box; display: inline-flex; height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 0px 12px; position: relative; background-color: var(--badge-bg-color); border-radius: 29px; border: 1px solid; border-color: var(--badge-border-color); cursor: pointer; transition: all 0.2s ease; } .anima-badge .badge-button:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(108, 83, 206, 0.3); } /* Badge Content */ .anima-badge .badge-content { display: inline-flex; align-items: center; gap: 8px; position: relative; flex: 0 0 auto; } .anima-badge .badge-icon { position: relative; width: 16px; height: 16px; } .anima-badge .badge-text { position: relative; width: fit-content; font-family: var(--body-regular-md-font-family); font-weight: var(--body-regular-md-font-weight); color: var(--badge-text-color); font-size: var(--body-regular-md-font-size); letter-spacing: var(--body-regular-md-letter-spacing); line-height: var(--body-regular-md-line-height); font-style: var(--body-regular-md-font-style); white-space: nowrap; } /* Close Button */ .anima-badge .close-button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; cursor: pointer; opacity: 0.7; transition: opacity 0.2s ease; } .anima-badge .close-button:hover { opacity: 1; } .anima-badge .close-icon { position: relative; width: 16px; height: 16px; } /* Responsive styles */ @media screen and (max-width: 768px) { .anima-badge { bottom: 16px; right: 16px; } .anima-badge .badge-button { height: 36px; padding: 0px 10px; gap: 6px; } .anima-badge .badge-text { font-size: 13px; } } @media screen and (max-width: 480px) { .anima-badge { bottom: 12px; right: 12px; } .anima-badge .badge-button { height: 32px; padding: 0px 8px; gap: 6px; } .anima-badge .badge-text { font-size: 12px; } .anima-badge .badge-icon, .anima-badge .close-icon { width: 14px; height: 14px; } } `, Pt = () => { let e = window.location.pathname; window.addEventListener("popstate", () => { const o = document.getElementById("anima-badge"); o && window.location.pathname !== e && (o.style.display = "", e = window.location.pathname); }); const t = history.pushState, n = history.replaceState; history.pushState = function(...o) { t.apply(this, o); const i = document.getElementById("anima-badge"); i && window.location.pathname !== e && (i.style.display = "", e = window.location.pathname); }, history.replaceState = function(...o) { n.apply(this, o); const i = document.getElementById("anima-badge"); i && window.location.pathname !== e && (i.style.display = "", e = window.location.pathname); }; }; typeof window < "u" && !window.__animaBadgeListenerSetup && (Pt(), window.__animaBadgeListenerSetup = !0); const Jt = ({ onStartNowClick: e, startNowUrl: t, onClose: n }) => zt`
{ e && e(); }} class="badge-button">
Anima logo
Built with Anima
`, Zt = (e) => fetch("https://l.animaapp.com/analytics/collect", { method: "POST", headers: { "Content-Type": "application/json", "X-Client-Id": "dev.animaapp.io" }, body: JSON.stringify(e) }).catch(() => { }), Z = (e, t = {}) => { const n = { eventAction: e, params: { platform: "playground-website", origin: "playground-website", ...t, domain: window.location.hostname, url: window.location.href }, time: new Date().getTime() }; return Zt([n]); }; class Rt { constructor() { W(this, "data"); this.data = window.__anima__, document.addEventListener("DOMContentLoaded", () => { this.setup(); }); } setup() { const t = this.data?.session_data; Z("playground-website.pageview", { session_id: this.data?.session_id || "" }), t?.is_paying_team || this.injectFreeWebsiteBanner(); } injectFreeWebsiteBanner() { const n = `https://www.animaapp.com/an?url=https%3A%2F%2Fwww.animaapp.com&utm_content=${window.location.hostname}&utm_medium=anima-playground&utm_source=free-website-banner`, o = document.createElement("div"); o.style.marginBottom = "48px", jt( o, Jt({ onStartNowClick: () => { Z("playground-website.banner.start-now-click"); }, startNowUrl: n }) ), document.body.prepend(o); } } const Xt = new Rt(); export { Xt as animaScripts };